#!/bin/sh

JVM_OPS="-Xmx1G -Xms1G"
GC_COMMON_OPS="-XX:+PrintGC -XX:+PrintGCDateStamps"

GC_TYPES_OPS=(SerialGC ParallelGC ConcMarkSweepGC G1GC)

for gc_type in ${GC_TYPES_OPS[*]}
do
    echo Running with ${gc_type} ...
    java -jar ${JVM_OPS} ${GC_COMMON_OPS} -XX:+Use${gc_type} -Xloggc:logs/${gc_type}.log target/jvm-gc-1.0-SNAPSHOT.jar
done